home *** CD-ROM | disk | FTP | other *** search
- on printitem
- global pictureButton, mapButton, printButton, textButton, clickedTopic
- activateButtonKeepActivated(the clickOn)
- set badButtonsList to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]
- set badButtonsLocHList to []
- set badButtonsLocHList to getSpriteListLocH(badButtonsList)
- moveSpritesOffstage(badButtonsList)
- set explorerFrameLabel to getMarkerFromExplorer(clickedTopic)
- if the name of cast the castNum of sprite pictureButton = "Picture ACTIVATED" then
- setTextField(clickedTopic)
- set explorerPrintFrame to explorerFrameLabel && "PRT"
- printFrame(explorerPrintFrame)
- end if
- if the name of cast the castNum of sprite textButton = "Text ACTIVATED" then
- printText()
- end if
- if the name of cast the castNum of sprite mapButton = "Map ACTIVATED" then
- setTextField(clickedTopic)
- set explorerPrintFrame to explorerFrameLabel && "PRT"
- printFrame(label(explorerPrintFrame) + 1)
- end if
- setSpriteListLocH(badButtonsList, badButtonsLocHList)
- end
-
- on getMarkerFromExplorer explorer
- global mapMarkers
- set topicLine to 1
- set the itemDelimiter to ":"
- repeat with i = 1 to the number of lines in mapMarkers
- if item 1 of line i of mapMarkers = explorer then
- set marker to item 2 of line i of mapMarkers
- set the itemDelimiter to ","
- exit repeat
- end if
- end repeat
- return marker
- end
-
- on printFrame aPrintFrame
- global hilitTopic
- if stringp(aPrintFrame) then
- set aPrintFrame to label(aPrintFrame)
- end if
- set oldStageColor to the stageColor
- set the stageColor to 0
- set saveHilitTopicPos to the locH of sprite hilitTopic
- set the locH of sprite hilitTopic to 3000
- printFrom(aPrintFrame, aPrintFrame)
- set the locH of sprite hilitTopic to saveHilitTopicPos
- set the stageColor to oldStageColor
- end
-
- on setTextField anExplorer
- put " " into field "ExplorerName"
- set the textFont of field "ExplorerName" to "Palatino"
- set the textSize of field "ExplorerName" to 18
- set the textAlign of field "ExplorerName" to "left"
- put anExplorer into field "ExplorerName"
- end
-
- on setPuppets Alist, state
- repeat with i = 1 to count(Alist)
- puppetSprite(getAt(Alist, i), state)
- end repeat
- end
-
- on getPuppetList
- set puppetList to []
- repeat with i = 1 to 48
- if the puppet of sprite i then
- append(puppetList, i)
- end if
- end repeat
- return puppetList
- end
-
- on hideNonPrintingSprites
- if not (the machineType = 256) then
- exit
- end if
- repeat with s = 1 to 25
- set the visible of sprite s to 0
- end repeat
- repeat with s = 32 to 47
- set the visible of sprite s to 0
- end repeat
- end
-
- on unhideNonPrintingSprites
- if not (the machineType = 256) then
- exit
- end if
- repeat with s = 1 to 25
- set the visible of sprite s to 1
- end repeat
- repeat with s = 32 to 47
- set the visible of sprite s to 1
- end repeat
- end
-
- on getSpriteListLocH Alist
- set LocHList to []
- repeat with i = 1 to count(Alist)
- set aSpriteLocH to the locH of sprite getAt(Alist, i)
- append(LocHList, aSpriteLocH)
- end repeat
- return LocHList
- end
-
- on moveSpritesOffstage Alist
- repeat with i = 1 to count(Alist)
- set the locH of sprite getAt(Alist, i) to 3000
- end repeat
- end
-
- on setSpriteListLocH Alist, aLocHList
- repeat with i = 1 to count(Alist)
- set oldLocH to getAt(aLocHList, i)
- set the locH of sprite getAt(Alist, i) to oldLocH
- end repeat
- end
-